require(rbacon)
#require(devtools)
#load_all("~/Dropbox/devsoftware/rbacon")
Bacon(run=FALSE, ask=F, coredir="~/peat/Bacon", ssize=500, BCAD=F)

agedepth()
## Calculating age ranges...
## 
## Preparing ghost graph...

## 
## Mean 95% confidence ranges 164 yr, min. 83 yr at 42.5 cm, max. 299 yr at 95.5 cm
## 100% of the dates overlap with the age-depth model (95% ranges)
## Posteriors: accrate mean 22.33, shape 1.71, memory mean 0.56, strength 12.48
agedepth(rotate.axes=TRUE)
## Calculating age ranges...
## 
## Preparing ghost graph...

## 
## Mean 95% confidence ranges 164 yr, min. 83 yr at 42.5 cm, max. 299 yr at 95.5 cm
## 100% of the dates overlap with the age-depth model (95% ranges)
## Posteriors: accrate mean 22.33, shape 1.71, memory mean 0.56, strength 12.48
agedepth(BCAD=TRUE)
## Calculating age ranges...
## 
## Preparing ghost graph...

## 
## Mean 95% confidence ranges 164 yr, min. 83 yr at 42.5 cm, max. 299 yr at 95.5 cm
## 100% of the dates overlap with the age-depth model (95% ranges)
## Posteriors: accrate mean 22.33, shape 1.71, memory mean 0.56, strength 12.48
agedepth(rotate.axes=TRUE, BCAD=TRUE)
## Calculating age ranges...
## 
## Preparing ghost graph...

## 
## Mean 95% confidence ranges 164 yr, min. 83 yr at 42.5 cm, max. 299 yr at 95.5 cm
## 100% of the dates overlap with the age-depth model (95% ranges)
## Posteriors: accrate mean 22.33, shape 1.71, memory mean 0.56, strength 12.48
agedepth(rev.d=TRUE)
## Calculating age ranges...
## 
## Preparing ghost graph...

## 
## Mean 95% confidence ranges 164 yr, min. 83 yr at 42.5 cm, max. 299 yr at 95.5 cm
## 100% of the dates overlap with the age-depth model (95% ranges)
## Posteriors: accrate mean 22.33, shape 1.71, memory mean 0.56, strength 12.48
agedepth(rev.age=TRUE)
## Calculating age ranges...
## 
## Preparing ghost graph...

## 
## Mean 95% confidence ranges 164 yr, min. 83 yr at 42.5 cm, max. 299 yr at 95.5 cm
## 100% of the dates overlap with the age-depth model (95% ranges)
## Posteriors: accrate mean 22.33, shape 1.71, memory mean 0.56, strength 12.48
agedepth(rev.d=TRUE, rev.age=TRUE)
## Calculating age ranges...
## 
## Preparing ghost graph...

## 
## Mean 95% confidence ranges 164 yr, min. 83 yr at 42.5 cm, max. 299 yr at 95.5 cm
## 100% of the dates overlap with the age-depth model (95% ranges)
## Posteriors: accrate mean 22.33, shape 1.71, memory mean 0.56, strength 12.48
agedepth(rotate.axes=TRUE, rev.d=TRUE, rev.age=TRUE)
## Calculating age ranges...
## 
## Preparing ghost graph...

## 
## Mean 95% confidence ranges 164 yr, min. 83 yr at 42.5 cm, max. 299 yr at 95.5 cm
## 100% of the dates overlap with the age-depth model (95% ranges)
## Posteriors: accrate mean 22.33, shape 1.71, memory mean 0.56, strength 12.48
agedepth(BCAD=T)
## Calculating age ranges...
## 
## Preparing ghost graph...

## 
## Mean 95% confidence ranges 164 yr, min. 83 yr at 42.5 cm, max. 299 yr at 95.5 cm
## 100% of the dates overlap with the age-depth model (95% ranges)
## Posteriors: accrate mean 22.33, shape 1.71, memory mean 0.56, strength 12.48
agedepth(BCAD=T, rev.age=T)
## Calculating age ranges...
## 
## Preparing ghost graph...

## 
## Mean 95% confidence ranges 164 yr, min. 83 yr at 42.5 cm, max. 299 yr at 95.5 cm
## 100% of the dates overlap with the age-depth model (95% ranges)
## Posteriors: accrate mean 22.33, shape 1.71, memory mean 0.56, strength 12.48
agedepth(BCAD=F)
## Calculating age ranges...
## 
## Preparing ghost graph...

## 
## Mean 95% confidence ranges 164 yr, min. 83 yr at 42.5 cm, max. 299 yr at 95.5 cm
## 100% of the dates overlap with the age-depth model (95% ranges)
## Posteriors: accrate mean 22.33, shape 1.71, memory mean 0.56, strength 12.48
layout(1)
accrate.depth.ghost()

accrate.depth.ghost(rotate.axes=T)

accrate.depth.ghost(rev.d=T)

accrate.depth.ghost(rev.acc=T)

accrate.depth.ghost(rev.d=T, rev.acc=T)

accrate.depth.ghost(rev.d=T, rev.acc=T, rotate.axes=T)

accrate.age.ghost()
## 

accrate.age.ghost(rotate.axes=T)
## 

accrate.age.ghost(rev.age=T)
## 

accrate.age.ghost(rev.acc=T)
## 

accrate.age.ghost(BCAD=T)
## 

accrate.age.ghost(BCAD=T, rev.acc=T, rev.age=T)
## 

accrate.age.ghost(rev.age=T, rev.acc=T)
## 

accrate.age.ghost(rev.age=T, rev.acc=T, rotate.axes=T)
## 

myflux <- cbind(0:100, rnorm(101, 100, 5))
flux.age.ghost(flux=myflux)

flux.age.ghost(rotate.axes=T, flux=myflux)

flux.age.ghost(rev.flux=T, flux=myflux)

flux.age.ghost(rev.age=T, flux=myflux)

Bacon(slump=c(20,21), ssize=500, coredir="~/peat/Bacon", ask=F)
##  Will run 2,200,000 iterations and store 500
## Calculating age ranges...
## 
## Preparing ghost graph...

## 
## Mean 95% confidence ranges 215 yr, min. 109 yr at 70.5 cm, max. 339 yr at 91.5 cm
## 100% of the dates overlap with the age-depth model (95% ranges)
## Posteriors: accrate mean 22.66, shape 1.82, memory mean 0.52, strength 7.74
Bacon("RLGH3", accept.suggestions=T, ask=F)
##  Using a mix of cal BP and calibrated C-14 dates
## Adapting acc.mean to 50 yr/cm
##  Will run 9,187,500 iterations and store 4,000
## Calculating age ranges...
## 
## Preparing ghost graph...

## 
## Mean 95% confidence ranges 587 yr, min. 57 yr at 0 cm, max. 1750 yr at 220 cm
## Warning! Only 76% of the dates overlap with the age-depth model (95% ranges)
## Posteriors: accrate mean 46.07, shape 0.8, memory mean 0.45, strength 13.23
accrate.age.ghost(BCAD=T)
##